<template>
    <ul class="news-list">
        <li>编号：{{ id }}</li>
        <li>标题：{{ title }}</li>
        <li>内容：{{ content }}</li>
    </ul>
</template>

<script setup lang="ts" name="About">
import { useRoute } from 'vue-router'
import { watch, onMounted, onUnmounted ,toRefs} from 'vue'
// const route = useRoute()
// let {query}=toRefs(route)
// console.log(query);

// 打印query参数
// watch(query, (value) => {
//     console.log('Query parameters changed:', value)
// })
// onMounted(() => {
//     // console.log('About onMounted')
// })

// onUnmounted(() => {
//     // console.log('About onUnmounted')
// })


defineProps([
    'id', 'title', 'content'
])

</script>
<style scoped>
.news-list {
    list-style: none;
    padding-left: 20px;
}

.news-list>li {
    line-height: 30px;
}
</style>